import './assets/css/main.css'

import { createApp } from 'vue'
import store from './store/index'


import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 生成 Vue 实例 app
const app = createApp(App)

// 全局注入图标icon
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

// 引用组件
app.use(store)
    .use(router)
    .use(ElementPlus, {
        locale: zhCn,
        button: {
            autoInsertSpace: true
        }
    })

// 挂载到 #app
app.mount('#app')